# -*- coding: utf-8 -*-
# https://blog.csdn.net/weixin_52040868
# 公众号：测个der
# 微信：qing_an_an


from PyQt5.QtWidgets import *
from PyQt5.QtGui import *
import sys


class QPix(QWidget):
    def __init__(self):
        super(QPix, self).__init__()

        label = QLabel()
        label.setPixmap(QPixmap("头像.jpg"))

        self.resize(300,300)

        box = QVBoxLayout()
        box.addWidget(label)

        self.setLayout(box)


if __name__ == '__main__':
    app = QApplication(sys.argv)
    qp = QPix()
    qp.show()
    sys.exit(app.exec_())